package com.mzw.project.common;


import com.mzw.project.model.dto.user.UserLoginRequest;

public class UserHolder {
    private static final ThreadLocal<UserLoginRequest> tl = new ThreadLocal<>();

    public static void saveUser(UserLoginRequest user){
        tl.set(user);
    }

    public static UserLoginRequest getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
